chore(examples): minor improvements to async-user-confirmation and dependencies updates #36
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant updates to the
async-user-confirmation
examples, focusing on restructuring imports, enhancing authentication, and improving the architecture for agent-based chat functionality. The most important changes include reorganizing file paths and imports, integrating Auth0 authentication with async user confirmation, and refactoring the agent and memory management for better modularity and scalability.File Path and Import Restructuring:
src
directory structure for better organization and clarity. For example, imports inagent.py
,conditional_trade.py
, andtools/conditional_trade.py
were updated to usesrc.agents
paths. [1] [2] [3]Dependency Updates:
pyproject.toml
files for bothlangchain-examples
andllama-index-examples
, including version bumps forlanggraph-api
,langgraph-runtime-inmem
, and the addition ofauth0-server-python
. [1] [2]Auth0 Integration:
auth0
module in thellama-index-examples
, which includesauth.py
,auth0_ai.py
, androutes.py
for handling authentication, async user confirmation, and session management. This includes implementingServerClient
andwith_async_user_confirmation
for secure and interactive user authentication. [1] [2] [3]Agent and Memory Refactoring:
get_agent
andget_memory
functions inagent.py
andmemory.py
, respectively, to modularize the creation and management of agents and memory buffers. This improves scalability and reusability for chat-based applications. [1] [2]Application Logic Enhancements:
app.py
to simplify the application logic by delegating authentication routes to a blueprint and improving the chat handling flow with session-based validation and memory integration.These changes collectively enhance the maintainability, modularity, and functionality of the
async-user-confirmation
examples.